<?php


declare(strict_types=1);

namespace App\Controller\Abell;

use App\Controller\AbstractController;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
// nats 使用
use App\Nats\Publish\ProxyNats;
/**
 * @Controller()
 */
class NatController extends AbstractController
{
    /**
     * REDIS 列表数据展示
     * Abell 2020/5/13
     * @RequestMapping(path="/abell/nat/list", methods="get")
     */
    public function list(){
//        $obj = $this->container->get(ProxyNats::class);
//        $msg = $obj->sync(json_encode(['openid'=>$openids_str,'type'=>1]),'sg_phonecode.recharge');
        // sg_phonecode.coupon
        $obj = $this->container->get(ProxyNats::class);
        $msg = $obj->sync(json_encode(['hello'=>'hello']),'sg_phonecode.user');
        return $msg;
    }
}
